# -*- mode: python -*-

Import("env")

env = env.Clone()

env.CppUnitTest(
    target="shard_server_op_observer_test",
    source=[],
    LIBDEPS=[],
)

env.CppUnitTest(
    target="db_s_shard_server_test",
    source=[],
    LIBDEPS=[],
)

env.CppUnitTest(
    target="db_s_config_server_test",
    source=[],
    LIBDEPS=[],
)

env.Benchmark(
    target="chunk_manager_refresh_bm",
    source=[
        "chunk_manager_refresh_bm.cpp",
    ],
    LIBDEPS=[
        "$BUILD_DIR/mongo/db/shard_role_api",
    ],
    CONSOLIDATED_TARGET="sharding_bm",
)

env.Benchmark(
    target="migration_chunk_cloner_source_bm",
    source=[
        "migration_chunk_cloner_source_bm.cpp",
    ],
    LIBDEPS=[
        "$BUILD_DIR/mongo/db/auth/authmocks",
        "$BUILD_DIR/mongo/db/auth/authorization_manager_global",
        "sharding_runtime_d",
    ],
)

env.Benchmark(
    target="sharding_write_router_bm",
    source=[
        "sharding_write_router_bm.cpp",
    ],
    LIBDEPS=[
        "$BUILD_DIR/mongo/db/auth/authmocks",
        "$BUILD_DIR/mongo/db/auth/authorization_manager_global",
        "$BUILD_DIR/mongo/db/service_context_non_d",
        "$BUILD_DIR/mongo/s/catalog/sharding_catalog_client_impl",
        "$BUILD_DIR/mongo/s/sharding_test_fixture_common",
        "sharding_runtime_d",
    ],
    CONSOLIDATED_TARGET="sharding_bm",
)

env.Benchmark(
    target="placement_history_bm",
    source=[
        "placement_history_bm.cpp",
    ],
    LIBDEPS=[
        "$BUILD_DIR/mongo/db/auth/authmocks",
        "$BUILD_DIR/mongo/db/auth/authorization_manager_global",
        "$BUILD_DIR/mongo/db/read_write_concern_defaults_mock",
        "$BUILD_DIR/mongo/db/repl/wait_for_majority_service",
        "$BUILD_DIR/mongo/db/session/session_catalog_mongod",
        "config_server_test_fixture",
        "sharding_catalog_manager",
    ],
)
